<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        !function(global){
            function DetectorBase(configs){
                if(this instanceof DetectorBase){
                    throw new Error('Do not invoke without new');
                }
                this.configs = configs;
                this.analyze();
            }
            DetectorBase.prototype.detect = function(){
                throw new Error('Not implemented');
            };
            DetectorBase.prototype.analyze = function(){
                console.log('analyzing...');
                this.data = "###data###";
            }
        }
        
    </script>
</body>
</html>